'use strict'
angular.module('app').controller('mainCtrl',['$http','$scope',function ($http,$scope) {
    $http.get('/data/positionList.json').then(function(resp){
        $scope.list = resp;
        console.info(resp);
    }).catch(function (result) {
       console.info(result);          //注意angularJS的版本是success 还是then 1.6版本的是then和catch
    });

   /* $scope.list = [{
        id:'1',
        companyName:'A',
        cityName:'上海',
        date:'2017-08-17'
    },
        {
            id:'2',
            companyName:'B',
            cityName:'上海',
            date:'2017-08-17'
        },
        {
            id:'3',
            companyName:'C',
            cityName:'上海',
            date:'2017-08-17'
        },
        {
            id:'4',
            companyName:'D',
            cityName:'上海',
            date:'2017-08-17'
        },
    ]*/


}]);